package pl.asoft.nbp.dao;

import java.util.HashMap;
import java.util.Map;

public class QueryParameterBuilder {

    private Map<String,Object> parameters = null;

    private QueryParameterBuilder(String name, Object value){
        this.parameters = new HashMap<>();
        this.parameters.put(name, value);
    }

    public static QueryParameterBuilder parameter(String name,Object value){
        return new QueryParameterBuilder(name, value);
    }

    public QueryParameterBuilder and(String name,Object value){
        this.parameters.put(name, value);
        return this;
    }

    public Map<String,Object> build(){
        return this.parameters;
    }
}
